﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public static class MeshExtensions
{
    public static uint GetTriangleCountEx(this Mesh mesh)
    {
        uint triangleCount = 0;
        for(int s = 0; s < mesh.subMeshCount; s++)
        {
            triangleCount += mesh.GetIndexCount(s) / 3;
        }
        return triangleCount;
    }
}
